package org.activequant.calendar;

import java.util.TimeZone;

import org.activequant.core.types.Exchange;

public class NYSECalendarSettings implements IExchangeCalendarSettings {
	private static final NYSECalendarSettings NYSECalendarSettings = new NYSECalendarSettings();
	private static final Exchange EXCHANGE = Exchange.XNYS;
	private static final TimeZone TIMEZONE = TimeZone.getTimeZone("CST");
	private static final long OPENING = ((8 * 3600L) +1800L) * 1000L;
	private static final long CLOSE = 15 * 3600L * 1000L;

	/**
	 * Gets a instance for the NYSE calendar settings.<br/>
	 * returns the associated NYSECalendarSettings(NYSECalendarSettings)
	 * @return the instance for the settings.
	 */
	public static synchronized NYSECalendarSettings getInstance() {
		return NYSECalendarSettings;
	}
	/**
	 * an empty private NYSECalendarSettings (implements IExchangeCalendarSettings) constructor
	 */
	private NYSECalendarSettings() {
		// Instantiation not allowed
	}

	public TimeZone getTimeZone() {
		return TIMEZONE;
	}

	public long getRegularOpeningTime() {
		return OPENING;
	}

	public long getRegularClosingTime() {
		return CLOSE;
	}

	public Exchange getExchange() {
		return EXCHANGE;
	}
}
